package com.basic.business.prodRel.domain.excel;

import cn.idev.excel.annotation.ExcelProperty;
import cn.idev.excel.annotation.write.style.ColumnWidth;
import com.basic.common.utils.easyExcel.ExcelImgUrlConverter;
import com.basic.common.utils.easyExcel.ExcelServeMerge;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * Excel导出类
 *
 * @author zhaoxy_jn@163.com
 */
@Getter
@Setter
@EqualsAndHashCode
@ColumnWidth(25)
public class TProdRelExportExcel {

    /** 标识 */
    @ExcelServeMerge(needMerge = true, isPk = true)
    @ExcelProperty(value = "商品关系编号", index = 0)
    private String mark;

    @ExcelServeMerge(needMerge = true)
    @ExcelProperty(value = "店铺名称", index = 1)
    private String shopName;

    @ExcelServeMerge(needMerge = true)
    @ExcelProperty(value = "链接地址", index = 2)
    private String link;

    @ExcelServeMerge(needMerge = true)
    @ExcelProperty(value = "商品id", index = 3)
    private String productId;

    @ExcelServeMerge(needMerge = true)
    @ExcelProperty(value = "印刷品", index = 4)
    private String printedMaterials;

    @ExcelProperty(value = {"商品明细", "素材编号"}, index = 5)
    private String imgId;

    @ExcelProperty(value = {"商品明细", "文件数量"}, index = 6)
    private Integer imgNum;

    @ExcelProperty(value = {"商品明细", "文件尺寸"}, index = 7)
    private String imgDimensions;

    @ExcelProperty(value = {"商品明细", "文件材质"}, index = 8)
    private String imgMaterial;

    @ExcelProperty(value = {"商品明细", "缩略图"}, index = 9, converter = ExcelImgUrlConverter.class)
    private String imgPngPath;

    @ExcelProperty(value = {"商品明细", "文件名称"}, index = 10)
    private String imgName;


    @Override
    public String toString() {
        return "TProdRelExportExcel{" +
                "mark=" + mark +
                ", shopName='" + shopName + '\'' +
                ", link='" + link + '\'' +
                ", productId='" + productId + '\'' +
                ", printedMaterials='" + printedMaterials + '\'' +
                ", imgId='" + imgId + '\'' +
                ", imgNum=" + imgNum +
                ", imgDimensions='" + imgDimensions + '\'' +
                ", imgMaterial='" + imgMaterial + '\'' +
                ", imgPngPath='" + imgPngPath + '\'' +
                ", imgName='" + imgName + '\'' +
                '}';
    }
}
